package com.cmii.sjw.department.control.jsc.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cmii.sjw.department.control.jsc.model.dto.*;
import com.cmii.sjw.department.control.jsc.model.entity.ApprovalApplication;
import com.cmii.sjw.department.control.jsc.model.entity.ApprovalChangeLog;
import com.cmii.sjw.department.control.jsc.model.entity.CockpitMetricsTree;
import com.cmii.sjw.department.control.jsc.model.vo.ApprovalApplicationVo;
import com.cmii.sjw.department.control.jsc.model.vo.HomePageVo;
import com.cmii.sjw.department.control.jsc.model.vo.StatsSnapshotVo;
import com.cmii.sjw.department.control.jsc.util.Result;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author jfh
 * @Date 2025-04-22 周二 15:51
 * @Version 1.0
 */


public interface CockpitMetricsTreeService {
    List<MetricsTreeNodeDTO> getTreeWithLevels(int levels);

    List<MetricsTreeNodeDTO> getNodeLoading(Long parentId);

    void buildIndicatorTree();

    List<MetricsTreeNodeDTO> getMetricsTree();

    Page<MetricsTreeDTO> getNodePage(MetricsTreeNodeQueryDTO query);

    void saveAsDraft(List<ApprovalChangeLog> drafts);

    Result<List<HistoricalRecordsDTO>> getHistoricalRecords(Long id);

    MetricsAppFormDTO metricApply(Long[] ids);

    Result<String> submitApply(MetricsAppFormDTO metricsAppFormDTO);

    Result<Page<ApprovalApplication>> applyHistoryPage(ApplyHistoryDTO applyHistoryDTO);

    Result<MetricsAppFormDTO> applyHistoryDetails(Long id);

    Result<String>  revokeInvalid(AuditInfoDTO auditInfoDTO);

    Result<Page<ApprovalApplicationVo>> findAuditsByPage(ApplyHistoryDTO auditInfoDTO);

    Page<CockpitMetricsTree> auditsHistory(MetricsTreeNodeQueryDTO query);

    Result<HomePageVo> homePage(HomePageQueryDTO query);

    Result<StatsSnapshotVo> StatsSnapshot(LocalDateTime startOfMonth, LocalDateTime endOfMonth);
}
